﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ClassResource.aspx.cs" Inherits="Manage_basisset_ClassResource" %>
<%@ Register Assembly="Brettle.Web.NeatUpload" Namespace="Brettle.Web.NeatUpload"
    TagPrefix="Upload" %>
<%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../script/AC_RunActiveContent.js" type="text/javascript"></script>
     <script type="text/javascript">
         function checkForm() {
             var title = document.getElementById("txtTitle");
             if (title.value.length == 0) {
                 alert("课件标题不能为空！");
                 title.focus();
                 return false;
             }
         }
         function ToggleVisibility(id, type) {
             el = document.getElementById(id);
             if (el.style) {

                 if (type == 'on') {

                     el.style.display = 'block';

                 }

                 else {

                     el.style.display = 'none';

                 }

             }

             else {

                 if (type == 'on') {

                     el.display = 'block';

                 }

                 else {

                     el.display = 'none';

                 }

             }

         }

  </script>
     <script src="../script/ViewVido.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript" src="../../FlexPaper/js/jquery.js"></script>
    <script language="javascript" type="text/javascript" src="../../FlexPaper/js/flexpaper_flash_debug.js"></script>
    <link rel="stylesheet" type="text/css" href="../skin/css/base.css" />
</head>
<body>
    <form id="form1" runat="server">
  <%-- <asp:ScriptManager ID="ScriptManager1" runat="server"  EnableScriptGlobalization="True" EnableScriptLocalization="True">
        </asp:ScriptManager>
    <asp:UpdatePanel ID="up1" runat="server" >
    <ContentTemplate>--%>
    <table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
   
    <tr bgcolor="#E7E7E7" style="border-bottom:none">
	    <td height="24" colspan="4" background="../skin/images/tbg.gif">&nbsp;课程文件列表</td>
    </tr>
    
    <tr style="background-color:#ffffff">
    <td colspan="4">
          <asp:GridView ID="GridView1" runat="server" Width="100%" CellPadding="4" BorderColor="#D1DDAA"  
                            AutoGenerateColumns="False"  DataKeyNames="ClassDetailId"  DataMember="Name" SelectedIndex="0" 
              OnRowDataBound="GridView1_RowDataBound" GridLines="Both" 
              AllowPaging="False" PageIndex="1" onrowcommand="GridView1_RowCommand" >
                            <Columns>
                                <asp:TemplateField HeaderText="标题" >
                                    <ItemTemplate>
                                        <asp:Label ID="lblname" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                                    </ItemTemplate>
                                   
                                    <ItemStyle Width="40%" />
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="文件名称" >
                                    <ItemTemplate>
                                        <asp:Label ID="lblOriginalName" runat="server" Text='<%# Eval("OriginalName") %>'></asp:Label>
                                    </ItemTemplate>
                                    
                                    <ItemStyle Width="40%" />
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="文件大小(KB)" >
                                    <ItemTemplate>
                                        <asp:Label ID="lblsize" runat="server" Text='<%# Eval("Size") %>'></asp:Label>
                                    </ItemTemplate>
                                    
                                    <ItemStyle Width="10%" />
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="操作">
                                    <ItemTemplate>
                                       <asp:LinkButton runat="server" ID="lbtEdit" CommandArgument='<%#Eval("ClassDetailId")%>'
                                    CommandName="modify" Text="编辑" Visible='<%#edit==1%>' ></asp:LinkButton>&nbsp;&nbsp;
                                   <asp:LinkButton runat="server" ID="lbtDelete" CommandArgument='<%#Eval("ClassDetailId")%>'
                                    CommandName="Del" Text="删除" Visible='<%#delete==1%>' OnClientClick="return confirm('您确定要删除该记录吗？')"></asp:LinkButton>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                            </Columns>
                            <PagerSettings FirstPageText="" LastPageText="" NextPageText="" PreviousPageText="" />
                            <RowStyle Height="20px" BackColor="#FFFFFF"  ForeColor="#000000" />
                            <FooterStyle BackColor="#FFFFFF" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#FCFDEE" />
                            <SelectedRowStyle BackColor="#FFFFFF"  ForeColor="#000000" />
                            <PagerStyle BackColor="#FCFDEE" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#FCFDEE"  ForeColor="000000" />
                            <AlternatingRowStyle BackColor="#FCFDEE" ForeColor="#000000" />
                            
                        </asp:GridView>
   </td>
   </tr>
    
    </table>
  
      <table width="98%" border="0" cellpadding="2" cellspacing="1"  align="center" style="margin-top:8px">
   
    <tr  style="border-bottom:none">
	    <td height="24" style=" text-align:right"> 
            <asp:Button ID="btnAddClassDetail" runat="server" Text="添加课程文件" 
                onclick="btnAddClassDetail_Click" />
        </td>
    </tr>
    </table>
      <table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
        <tr bgcolor="#E7E7E7">
          <td height="24" colspan="5" background="../skin/images/tbg.gif"><div align="left" >
              课件</div></td>
        </tr>
       <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
           <td align="left" >课件标题：</td>
           <td  align="left" colspan="4">
              <asp:TextBox ID="txtTitle" runat="server" Width="200px"></asp:TextBox>
              <asp:HiddenField ID="hdfClassDetailId" runat="server" Value="0" />
               
             </td>
        </tr>
         <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
           <td align="left" >简介：</td>
           <td  align="left" colspan="4">
              <%--<asp:TextBox ID="txtIntro" runat="server" TextMode="MultiLine" Width="350px" 
                   Height="150px"></asp:TextBox>--%>
               <CE:Editor ID="txtIntro" runat="server" Height="180px" Width="600px" 
                   AutoConfigure="Simple"  ShowToolBar="false" Font-Size="Smaller"  
                   ShowHtmlMode="false" ShowPreviewMode="false" AutoParseClasses="false"  
                   ShowTagSelector="false" AllowPasteHtml="false" ForeColor="Black" 
                   Font-Names="宋体" >

        </CE:Editor>
             </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
            <td align="left" >原文件名称：</td>
            <td  align="left" colspan="4">
                <asp:TextBox ID="txtOriginalName" runat="server"  Width="200px" Enabled="False" 
                    ReadOnly="True"></asp:TextBox>
             </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
            <td align="left" ></td>
            <td align="left" colspan="4">                   
                 <asp:Label ID="lblPlay" runat="server" ></asp:Label>
                 <div id="ProgressBar"  style="display:none">
 
                   <upload:ProgressBar ID="pbProgressBar" runat='server' Inline="true" Width="280px"
 
                           Height="50px">
 
                   </upload:ProgressBar>
 
               </div>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
            <td align="left"  width="200px" >上传课件文件：(支持上传文件的格式包括：swf、wmv、mp4、avi、doc、xls、ppt、docx、xlsx、pptx、pdf、gif、jpg、png、jpeg)</td>
            <td align="left"  colspan="4">                   
               
                <upload:inputfile id="InputFile1" runat="server" Width="266px" ></upload:inputfile>&nbsp;
                <asp:Button ID="btnupload" runat="server"  Text="上传" OnClientClick="ToggleVisibility('ProgressBar','on')"
                    onclick="btnupload_Click"/>
                  

            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
            <td align="left" ></td>
            <td align="left" colspan="4">                   
                  
            </td>
        </tr>
      </table>
      
      <!--  提交 -->
      <table width='98%'  border='0' cellpadding='1' cellspacing='1' bgcolor='#CBD8AC' align="center" style="margin-top:8px">
        <tr bgcolor='#EEF4EA'>
          <td background='skin/images/wbg.gif' align='center'><table border='0' cellpadding='0' cellspacing='0' align='center'>
              <tr>
                
                <td ><asp:Button ID="btnsave" runat="server" Text="保存"  OnClientClick="return checkForm();false" onclick="btnsave_Click" /></td>
               
              </tr>
            </table></td>
        </tr>
      </table>
   
    </form>
</body>
</html>
